package br.org.acessobrasil.portal.modelo;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;
@Entity
@Table(name = "sgctb_menu")
public class Menu implements Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue
	private Long nu_menu;
	private String no_menu;	
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	@JoinColumn(name = "nu_menu")
	@OrderBy("nu_ordem")
	private List<ItemMenu> listItemMenu;
	
	@ManyToOne
	@JoinColumn(name = "nu_sitio")
	private Sitio sitio;

	public String getNoMenu() {
		return no_menu;
	}

	public void setNoMenu(String no_nome) {
		this.no_menu = no_nome;
	}

	public Long getNuMenu() {
		return nu_menu;
	}

	public void setNuMenu(Long nu_menu) {
		this.nu_menu = nu_menu;
	}

	public List<ItemMenu> getListItemMenu() {
		return listItemMenu;
	}

	public void setListItemMenu(List<ItemMenu> listItemMenu) {
		this.listItemMenu = listItemMenu;
	}

	public Sitio getSitio() {
		return sitio;
	}
	public void setSitio(Sitio sitio) {
		this.sitio = sitio;
	}
}
